﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace TCC.ControleFluxoDeCaixa.Model.Usuarios
{
    public class Usuario
    {
        [Key][Browsable(false)]
        public int UsuarioId { get; set; }
        [Required]
        [Index(IsUnique = true)]
        [MaxLength(255)]
        public string Nome { get; set; }
        [Required][Index(IsUnique = true)]
        [MaxLength(20)]
        public string Login { get; set; }
        [Required]
        [DataType(DataType.Password)]
        public string Senha { get; set; }

        public Pessoa Pessoa { get; set; }

        public override string ToString()
        {
            return Nome;
        }
    }
}
